package com.laiketui.admin.mch.api.plugin;

import com.laiketui.domain.vo.MainVo;
import com.laiketui.domain.vo.plugin.bargin.AddBargainGoodsVo;
import com.laiketui.core.exception.LaiKeAPIException;

import java.util.Map;

/**
 * 砍价后台管理
 *
 * @author Trick
 * @date 2021/5/13 15:12
 */
public interface BargainService {

    /**
     * 获取砍价活动商品列表
     *
     * @param vo        -
     * @param goodsName -
     * @param status    -
     * @param id        -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 15:13
     */
    Map<String, Object> index(MainVo vo, String goodsName, Integer status, Integer id) throws LaiKeAPIException;


    /**
     * 置顶
     *
     * @param vo -
     * @param id -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 15:48
     */
    Map<String, Object> top(MainVo vo, int id) throws LaiKeAPIException;


    /**
     * 砍价活动明细
     *
     * @param vo      -
     * @param goodsId -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 16:23
     */
    Map<String, Object> bargainDetail(MainVo vo, int goodsId) throws LaiKeAPIException;

    /**
     * 删除砍价活动
     *
     * @param vo  -
     * @param ids -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 16:39
     */
    Map<String, Object> del(MainVo vo, String ids) throws LaiKeAPIException;

    /**
     * 获取砍价记录
     *
     * @param vo       -
     * @param barginId -
     * @param userName -用户名称
     * @param type     - all- 全部 0-砍价中 1-砍价成功 2-砍价失败
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 16:56
     */
    Map<String, Object> bargainRecordInfo(MainVo vo, Integer barginId, String userName, String type) throws LaiKeAPIException;
    interface TypeEnum{
        /**
         * 全部
         */
        String ALL = "all";
        /**
         * 砍价中
         */
        Integer BARGAINING = 0;
        /**
         * 砍价成功
         */
        Integer BARGAINING_SUCCESS = 1;
        /**
         * 砍价失败
         */
        Integer BARGAINING_FAILED = 2;
    }


    /**
     * 帮砍详情
     *
     * @param vo      -
     * @param orderNo -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 17:47
     */
    Map<String, Object> bargainHelperInfo(MainVo vo, String orderNo) throws LaiKeAPIException;


    /**
     * 获取砍价商品列表
     *
     * @param vo      -
     * @param classId -
     * @param brandId -
     * @param title   -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/13 13:54
     */
    Map<String, Object> getBargainGoods(MainVo vo, Integer classId, Integer brandId, String title) throws LaiKeAPIException;


    /**
     * 添加砍价商品活动
     *
     * @param vo -
     * @return Map
     * @throws LaiKeAPIException -
     * @author Trick
     * @date 2021/5/14 9:33
     */
    Map<String, Object> addBargainGoods(AddBargainGoodsVo vo) throws LaiKeAPIException;
}
